<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>8 模板语法-指令</title>
    <script src="js/vue.global.js"></script>
</head>
<body>
<div id="app">
    <site-name title="Google"></site-name>
    <site-name title="Runoob"></site-name>
    <site-name title="Taobao"></site-name>
</div>

<script>
    const app = Vue.createApp({})

    app.component('site-name', {
        props: ['title'],
        template: `<h4>{{ title }}</h4>`
    })

    app.mount('#app')
</script>
</body>
</html>